๐ FLUX.2 [klein] โ Sub-second generation. Open weights, Apache 2.0, API from $0.014/image. Learn more โ
curl --request POST \
--url https://api.bfl.ai/v1/flux-kontext-pro \
--header 'Content-Type: application/json' \
--header 'x-key: <api-key>' \
--data '
{
"prompt": "ein fantastisches bild",
"input_image": "<string>",
"input_image_2": "<string>",
"input_image_3": "<string>",
"input_image_4": "<string>",
"seed": 42,
"aspect_ratio": "<string>",
"output_format": "png",
"webhook_url": "<string>",
"webhook_secret": "<string>",
"prompt_upsampling": false,
"safety_tolerance": 2
}
'{
"id": "<string>",
"polling_url": "<string>",
"cost": 123,
"input_mp": 123,
"output_mp": 123
}Submits an image creation task with FLUX.1 Kontext [pro]. For image editing, prefer FLUX.2 [PRO] (/flux-2-pro) or FLUX.2 [FLEX] (/flux-2-flex) which are the recommended default models for editing workflows.
curl --request POST \
--url https://api.bfl.ai/v1/flux-kontext-pro \
--header 'Content-Type: application/json' \
--header 'x-key: <api-key>' \
--data '
{
"prompt": "ein fantastisches bild",
"input_image": "<string>",
"input_image_2": "<string>",
"input_image_3": "<string>",
"input_image_4": "<string>",
"seed": 42,
"aspect_ratio": "<string>",
"output_format": "png",
"webhook_url": "<string>",
"webhook_secret": "<string>",
"prompt_upsampling": false,
"safety_tolerance": 2
}
'{
"id": "<string>",
"polling_url": "<string>",
"cost": 123,
"input_mp": 123,
"output_mp": 123
}Documentation Index
Fetch the complete documentation index at: https://docs.bfl.ml/llms.txt
Use this file to discover all available pages before exploring further.
Text prompt for image generation.
"ein fantastisches bild"
Base64 encoded image or URL to use with Kontext.
Base64 encoded image or URL to use with Kontext. Experimental Multiref
Base64 encoded image or URL to use with Kontext. Experimental Multiref
Base64 encoded image or URL to use with Kontext. Experimental Multiref
Optional seed for reproducibility.
42
Aspect ratio of the image between 21:9 and 9:21
Output format for the generated image. Can be 'jpeg', 'png', or 'webp'.
jpeg, png, webp URL to receive webhook notifications
1 - 2083Optional secret for webhook signature verification
Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.
Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict.
0 <= x <= 62
Was this page helpful?